//
//  BulidingInfoLogic.h
//  QRMaster
//
//  Created by myApple on 15/12/22.
//  Copyright (c) 2015年 myApple. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BulidingModel.h"

typedef void(^resultBulidingData)(NSMutableArray * bulidingArray);
typedef void(^resultBulidingName)(NSString * bulidingName);

@interface BulidingInfoLogic : NSObject

/**
 *  插入楼栋基本信息
 *
 *  @param model       楼栋模型
 *  @param communityId 集群ID号
 */
-(void)insertBulidingInfo:(BulidingModel *)model withCommunityId:(NSString *)communityId;

/**
 *  查询楼栋的信息
 *
 *  @param condition     查询条件
 *  @param bulidingArray 楼栋的信息
 */
-(void)queryBulidingInfo:communityId
                   block:(resultBulidingData)bulidingArray;

/**
 *  查询楼栋的名字
 *
 *  @param communityId   集群id
 *  @param bulidingName  楼栋的名称
 */
-(void)queryBulidingName:(NSString *)buildingId
                   block:(resultBulidingName)bulidingName;


/**
 *  删除楼栋ID
 *
 *  @param communityId 集群ID
 */
-(void)deleteBulidingWithCommunityId:(NSString *)communityId;

@end
